<?php
// +----------------------------------------------------------------------
// | EtrolPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Author: 
// +----------------------------------------------------------------------

namespace app\common\validate;

use app\common\validate\Base;
/**
* 设置模型
*/
class Enterprise extends Base{

	protected $rule = array(	
		'fullName'        => 'require|unique:enterprise',	
		'shortname'   => 'require|unique:enterprise',
		'groupView'         => 'require',
		'productionStatus'     => 'require',
		'typeId'    => 'require',
		'enterpriseCode' => 'require',
		'enterDate'     => 'require|dateFormat:y-m-d',
		'totalInvestment'      => 'require|float',
		'outPutValue'        => 'require|float',
		'outPutAmount'         => 'require|float',
		'unitId'         => 'require|integer',
		'legalPerson'         => 'require',
		'generalManager'         => 'require',
		'mobile'         => 'require|length:11',
		'longitude'   => 'require|regex:\d{1,3}\.\d{6}',
		'latitude'   => 'require|regex:\d{1,3}\.\d{6}',
		'licenseCheckStatus'         => 'require|number',
		'infoCheckStatus'         => 'require|number',
		'IsInPark'         => 'require|number',
	);
	protected $message = array(
		'fullName.require'        => '公司名称必须填写!',
		'fullName.unique'         => '该公司已存在!',
		'groupView.require'   => '工业园片区必须选择!',
		'enterDate.require'         => '入园时间必须填写!',
		'totalInvestment.require'    => '总投资必须填写!',
		'outPutValue.require' => '产值必须填写!',
		'outPutAmount.require'     => '产量必须填写!',
		'unitId.require'      => '产量单位必须选择!',
		'legalPerson.require'   => '企业法人姓名必须填写!',
	            'generalManager.require'     => '负责人姓名必须填写!',
		'mobile.require'    => '负责人手机必须填写!',
		'licenseCheckStatus.require'      => '营业执照审核状态必须填写!',
		
		'infoCheckStatus.require'     => '企业信息审核状态必须填写!',
		'IsInPark.require' => '是否园区内企业必须填写!',
	);
	protected $scene = array(
		'add'          => 'fullName,groupView,enterDate,totalInvestment,outPutValue,outPutAmount,unitId,legalPerson,legalPerson,generalManager,mobile,licenseCheckStatus,infoCheckStatus,IsInPark',
		'edit'    	   => 'fullName,groupView,enterDate,totalInvestment,outPutValue,outPutAmount,unitId,legalPerson,legalPerson,generalManager,mobile,licenseCheckStatus,infoCheckStatus,IsInPark',
		
	);
	

}